import { IWorkSpaceHistoryItem } from '@/appUtils/appData/interfaces'
import { readWorkSpaceHistory } from '@/appUtils/appData/workSpaceHistory'
import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useWorkSpaceHistoryStore = defineStore('workSpaceHistory', () => {
    const list = ref<IWorkSpaceHistoryItem[]>([])

    readWorkSpaceHistory().then(data => {
        list.value = data
    })

    return {
        list
    }
})
